import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DeviceToolsComponent } from './device-tools';
import { DeviceToolComponent } from './device-tool/device-tool.component';
import { AddDeviceToolComponent } from './device-tool/add-device-tool/add-device-tool.component';
import { EditDeviceToolComponent } from './device-tool/edit-device-tool/edit-device-tool.component';
import { CanActivateGuard } from 'src/app/@core/services/can-load-service.guard';

const routes: Routes = [
  {
    path:'',
    children:[
      {
        path:'device-tool',
        component:DeviceToolComponent,
        canActivate: [CanActivateGuard]
      },{
        path:"device-tool/add-device-tool",
        component:AddDeviceToolComponent,
        canActivate: [CanActivateGuard]
      },{
        path:"device-tool/edit-device-tool",
        component:EditDeviceToolComponent,
        canActivate: [CanActivateGuard]
      }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class DeviceToolsRoutingModule { }
